<script type="text/javascript" src="{HEJIN_PATH}public/admin/js/jquery.js"></script>
<script type="text/javascript" src="{HEJIN_PATH}public/admin/js/jquery.validation.min.js"></script>
<script type="text/javascript" src="{HEJIN_PATH}public/admin/js/admincp.js"></script>
<script type="text/javascript" src="{HEJIN_PATH}public/admin/js/jquery.tooltip.js"></script>
<script type="text/javascript" src="{HEJIN_PATH}public/admin/js/jquery.cookie.js"></script>
<link href="{HEJIN_PATH}public/admin/css/skin_0.css" rel="stylesheet" type="text/css" id="cssfile2" />
<link href="{HEJIN_PATH}public/admin/css/style.css" rel="stylesheet" type="text/css"/>


<div class="page">
  <div class="fixed-bar">
    <div class="item-title">
<div class="h3" style="width:auto">{lang hejin_box:editflb}</div>
      <ul class="tab-base">
        <li><a href="admin.php?action=plugins&operation=config&do={$_GET['do']}&identifier=hejin_box&pmod=windex" class="current"><span>{lang hejin_box:wfenlei}</span></a></li>
      </ul>
    </div>
  </div>
  <form id="add_form" method="post" enctype="multipart/form-data" action="">
    <input type="hidden" name="formhash" value="{FORMHASH}" />
    <input type="hidden" name="id" value="$flinfo['id']" />
    <table class="table tb-type2">
      <tbody>

        <tr class="noborder">
          <td colspan="2" class="required"><label class="validation" for="test_title">{lang hejin_box:title}</label></td>
        </tr>
        <tr class="noborder">
          <td class="vatop rowform"><input type="text" value="<!--{eval echo stripslashes($flinfo['title']);}-->" name="title" id="class_name" class="txt"></td>
          <td class="vatop tips"></td>
        </tr>
        <tr class="noborder">
          <td colspan="2"><label for="test_content">{lang hejin_box:content}</label></td>
        </tr>
        <tr class="noborder">
          <td class="vatop rowform"><textarea name="content" rows="4" class="tarea" id="statistics_code"><!--{eval echo stripslashes($flinfo['content']);}--></textarea>
         </td>
          <td class="vatop tips">{lang hejin_box:contentts}</td>
        </tr>
        
        <tr class="noborder">
          <td colspan="2" class="required"><label class="validation" for="test_pic">{lang hejin_box:flpic}</label></td>
        </tr>
        <tr class="noborder">
          <td class="vatop rowform"><input type="text" value="<!--{eval echo stripslashes($flinfo['pic']);}-->" name="pic" id="class_name" class="txt"></td>
          <td class="vatop tips"><a href="http://bbs.weixinhj.com/hejin_box/flpic/index.htm" target="_blank">{lang hejin_box:flpiczy}</a></td>
        </tr>


         <tr>
          <td colspan="2" class="required"><label class="validation" for="listid">{lang hejin_box:listid}</label></td>
        </tr>
        <tr class="noborder">
          <td class="vatop rowform"><select id="class_type" name="listid">
          <!--{loop $listidarray $key $listid}-->
          	{if $key==$flinfo['listid']}
              <option value="$key" selected="selected">$listid</option>
             {else}
              <option value="$key">$listid</option>
             {/if}
          <!--{/loop}-->
            </select>
           </td>
          <td class="vatop tips"><a href="http://bbs.weixinhj.com/hejin_box/listiddbt.htm" target="_blank">{lang hejin_box:listid}{lang hejin_box:duibitu}</a></td>
        </tr>

         <tr>
          <td colspan="2" class="required"><label class="validation" for="showid">{lang hejin_box:showid}</label></td>
        </tr>
        <tr class="noborder">
          <td class="vatop rowform"><select id="class_type" name="showid">
          <!--{loop $showidarray $key $showid}-->
          	{if $key==$flinfo['showid']}
              <option value="$key" selected="selected">$showid</option>
             {else}
              <option value="$key">$showid</option>
             {/if}
          <!--{/loop}-->
            </select>
          </td>
          <td class="vatop tips"><a href="http://bbs.weixinhj.com/hejin_box/showiddbt.htm" target="_blank">{lang hejin_box:showid}{lang hejin_box:duibitu}</a></td>
        </tr>

         <tr>
          <td colspan="2" class="required"><label class="validation" for="sort">{lang hejin_box:paixua}</label></td>
        </tr>
        <tr class="noborder">
          <td class="vatop rowform"><input id="sort" name="sort" type="text" class="txt" value="$flinfo['sort']" /></td>
          <td class="vatop tips"></td>
        </tr>
 
        <tr class="noborder" style="display:none;">
          <td colspan="2" class="required"><label class="validation" for="test_openid">{lang hejin_box:state}</label></td>
        </tr>

<tr style="background: none repeat scroll 0% 0% rgb(255, 255, 255);display:none;" class="noborder">
          <td class="vatop rowform onoff"><label for="openid1" class="cb-enable{if $flinfo['isshow']} selected{/if}"><span>{lang hejin_box:qiyong}</span></label>
            <label for="openid0" class="cb-disable{if !$flinfo['isshow']} selected{/if}"><span>{lang hejin_box:jinyong}</span></label>
            <input id="openid1" name="isshow"{if $flinfo['isshow']} checked="checked"{/if} value="1" type="radio">
            <input id="openid0" name="isshow"{if !$flinfo['isshow']} checked="checked"{/if} value="0" type="radio"></td>
          <td class="vatop tips"></td>
        </tr>
 
 
 
 
      </tbody>
      <tfoot>
        <tr>
          <td colspan="2"><input name="edit_fl" class="btn" type="submit" value="{lang hejin_box:baocun}" /></td>
        </tr>
      </tfoot>
    </table>
  </form>
</div>
<script type="text/javascript">
$(document).ready(function(){

    $("#submit").click(function(){
        $("#add_form").submit();
    });

    $("input[nc_type='microshop_goods_class_image']").live("change", function(){
		var src = getFullPath($(this)[0]);
		$(this).parent().prev().find('.low_source').attr('src',src);
		$(this).parent().find('input[class="type-file-text"]').val($(this).val());
	});


    $('#add_form').validate({
        errorPlacement: function(error, element){
            error.appendTo(element.parent().parent().prev().find('td:first'));
        },
        success: function(label){
            label.addClass('valid');
        },
        rules : {
            title: {
                required : true,
                maxlength : 1000
            },
            pic: {
                required : true,
                maxlength : 1000
            },
            isshow: {
                required : true,
			 },
            listid: {
                required : true,
                digits: true,
			 },
            showid: {
                required : true,
                digits: true,
			 },
        },
        messages : {
            title: {
                required : "{lang hejin_box:addmsga}",
                maxlength : jQuery.validator.format("{lang hejin_box:addmsgb}1000{lang hejin_box:addmsgc}")
            },
            pic: {
                required : "{lang hejin_box:addmsga}",
                maxlength : jQuery.validator.format("{lang hejin_box:addmsgb}1000{lang hejin_box:addmsgc}")
            },
            isshow: {
                required : "{lang hejin_box:addmsga}",
				},
            listid: {
                required : "{lang hejin_box:addmsga}",
				digits: "{lang hejin_box:addmsgd}",
				},
            showid: {
                required : "{lang hejin_box:addmsga}",
				digits: "{lang hejin_box:addmsgd}",
				},
        }
    });
});
</script> 
